
public class Loser implements Comparable<Loser>{
	private String	name;
	private int		startWeight;
	private int		currentWeight;
	
	Loser(String inName, int inStartWeight) {
		name		= inName;
		startWeight	= inStartWeight;
		currentWeight = startWeight;
	}
	
	public void setCurrentWeight(int newWeight) {
		if(newWeight < 100) {
			return;
		}
		
		currentWeight = newWeight;
	}
	
	public int getCurrentWeight() {
		return currentWeight;
	}
	
	public int getStartWeight() {
		return startWeight;
	}
	
	public int getWeightDifference() {
		int weightDifference = startWeight - currentWeight;
		return weightDifference;
	}
	
	public String getName() {
		return name;
	}
	
	public boolean equals(Object what) {
		Loser other = (Loser) what;
		return name.equals(other.name);
	}
	
	public int compareTo(Loser other) {
		int difference = getWeightDifference() - other.getWeightDifference();
		
		if(difference != 0) {
			return difference;
		}
		
		return name.compareTo(other.name);
	}
	
	public String toString() {
		String returnValue = "";
		
		returnValue += "Name: " + name;
		returnValue +=	" startWeight: " + startWeight;
		returnValue += " currentWeight:" + currentWeight;
			
		return returnValue;
	}

}
